package com.kai.service.article.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文章操作记录表
 * </p>
 *
 * @author wjk
 * @since 2022-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ArticleOperateRecord extends Model<ArticleOperateRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 文章id
     */
    private Long articleId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 操作类型 LIKE-点赞，NOLIKE-踩，COLLECT-收藏，READ-阅读
     */
    private String operateType;

    /**
     * 创建时间
     */
    private Date createDatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
